//definitiile de metode (corpurile metodelor)
#include "Complex.h"
Complex:: Complex(){
    (*this).real=1.0;  //this pointer catre obiectul curent
    (*this).imag=1.0;
}
Complex::Complex(double real, double imag)
{
    this->real=real;
    this->imag=imag;
}

Complex::~Complex()
{

}
Complex Complex::operator+(Complex z)
{
    double re,im;
    re=this->real + getReal();
    im=this->imag + getImag();
    Complex s = Complex(re,im);
    return s;
}


double Complex::getReal()
{
    return ((*this).real);
}

double Complex::getImag()
{
    return ((*this).imag);
}

void Complex::setReal(double re)
{
    this->real=re;
}

void Complex::setImag(double im)
{
    this->imag=im;
}













